from fastapi import FastAPI
from pydantic import BaseModel

from ChromeBot import ChromeBot

app = FastAPI()

class searchData(BaseModel):
    url: str = None

@app.post("/search/")
async def search(data: searchData):
    url = data.url
    bot = ChromeBot()
    content = bot.Search(url)
    return {"content": content}

